import React from 'react'

export const Context = React.createContext();

export const WithStore = Comp => props => {
    return (
        <Context.Consumer>
            {value => (
                <Comp 
                    {...props} 
                    {...value} 
                />
            )}
        </Context.Consumer>
    )
}
